package com.friends.digitpic.service.service.impl;

import javax.annotation.Resource;

import org.jeecgframework.minidao.pojo.MiniDaoPage;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.stereotype.Component;
import com.friends.digitpic.service.dao.AuthorDao;
import com.friends.digitpic.service.entity.AuthorEntity;
import com.friends.digitpic.service.service.AuthorService;

/**
 * 描述：作者
 * @author: jiangge xia
 * @since：2018年09月15日 22时44分20秒 星期六 
 * @version:1.0
 */

@Transactional
@Component
public class AuthorServiceImpl implements AuthorService {

	@Resource(name = "authorDao")
	private AuthorDao authorDao;


	public AuthorEntity getAuthor(String authorid) {
		return authorDao.get(authorid);
	}

	public int updateAuthor(AuthorEntity author) {
		return authorDao.update(author);
	}

	public void insertAuthor(AuthorEntity author) {
		authorDao.insert(author);
		
	}

	public MiniDaoPage<AuthorEntity> getAuthorAll(AuthorEntity author, int page, int rows) {
		return authorDao.getAll(author, page, rows);
	}

	public void deleteAuthor(AuthorEntity author) {
		authorDao.delete(author);
		
	}
}
